package logging

func init() {
	defaultLogging = NewStdFastLog()
}

var (
	defaultLogging Logging
)

func SetDefault(l Logging) {
	defaultLogging = l
}

type Logging interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})
	Debugln(args ...interface{})

	// Print(v ...interface{})
	// Printf(format string, v ...interface{})
	// Println(v ...interface{})

	Info(args ...interface{})
	Infof(format string, args ...interface{})
	Infoln(args ...interface{})

	Warning(args ...interface{})
	Warningf(format string, args ...interface{})
	Warningln(args ...interface{})

	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Errorln(args ...interface{})

	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})
	Fatalln(args ...interface{})
}

func Debug(args ...interface{}) {
	defaultLogging.Debug(args)
}
func Debugf(format string, args ...interface{}) {
	defaultLogging.Debugf(format, args)
}
func Debugln(args ...interface{}) {
	defaultLogging.Debugln(args)
}

// func Print(args ...interface{}) {
// 	defaultLogging.Print(args)
// }
// func Printf(format string, args ...interface{}) {
// 	defaultLogging.Printf(format, args)
// }
// func Println(args ...interface{}) {
// 	defaultLogging.Println(args)
// }

func Info(args ...interface{}) {
	defaultLogging.Info(args)
}
func Infof(format string, args ...interface{}) {
	defaultLogging.Infof(format, args)
}
func Infoln(args ...interface{}) {
	defaultLogging.Infoln(args)
}

func Warning(args ...interface{}) {
	defaultLogging.Warning(args)
}
func Warningf(format string, args ...interface{}) {
	defaultLogging.Warningf(format, args)
}
func Warningln(args ...interface{}) {
	defaultLogging.Warningln(args)
}

func Error(args ...interface{}) {
	defaultLogging.Error(args)
}
func Errorf(format string, args ...interface{}) {
	defaultLogging.Errorf(format, args)
}
func Errorln(args ...interface{}) {
	defaultLogging.Errorln(args)
}

func Fatal(args ...interface{}) {
	defaultLogging.Fatal(args)
}
func Fatalf(format string, args ...interface{}) {
	defaultLogging.Fatalf(format, args)
}
func Fatalln(args ...interface{}) {
	defaultLogging.Fatalln(args)
}
